/*
 * Author: Thomas
 * Utility functions.
 */

/**
 * Creates a link tag.
 * @param {type} data - content (display text)
 * @param {type} link - location
 * @returns {String}
 */
cmt.asLinkTag = function (data, link) {
    return "<a href='" + link + "'>" + data + "</a>";
};

cmt.submitParentFormOf = function (element) {
    $(element).closest("form").submit();
};

cmt.submitFormWithName = function (name) {
    $("form[name='" + name + "']").submit();
};